<link rel="stylesheet" href="css/reset.css">
<div class="main">
    <div class="center">
        <h2><img src="img/5.webp" alt=""></h2>

        <h3>
            <span>手机</span>
           <a href="">查看更多
               <span> > </span>
           </a>
        </h3>
        <div class="shouji">
            <div class="left">
                <img src="img/8.webp" alt="">
            </div>
            <div class="right">
               <a href="huodong.html">
                <figure>
                    <img />
                    <figcaption>1</figcaption>
                    <p>1</p>
                    <span>1</span>
                </figure>
               </a>
               <a href="huodong.html">
                <figure>
                    <img />
                    <figcaption>1</figcaption>
                    <p>1</p>
                    <span>1</span>
                </figure>
               </a>
               <a href="huodong.html">
                <figure>
                    <img />
                    <figcaption>1</figcaption>
                    <p>1</p>
                    <span>1</span>
                </figure>
               </a>
               <a href="huodong.html">
                <figure>
                    <img />
                    <figcaption>1</figcaption>
                    <p>1</p>
                    <span>1</span>
                </figure>
               </a>
               <a href="huodong.html">
                <figure>
                    <img />
                    <figcaption>1</figcaption>
                    <p>1</p>
                    <span>1</span>
                </figure>
               </a>
               <a href="huodong.html">
                <figure>
                    <img />
                    <figcaption>1</figcaption>
                    <p>1</p>
                    <span>1</span>
                </figure>
               </a>
               <a href="huodong.html">
                <figure>
                    <img />
                    <figcaption>1</figcaption>
                    <p>1</p>
                    <span>1</span>
                </figure>
               </a>
               <a href="huodong.html">
                <figure>
                    <img />
                    <figcaption>1</figcaption>
                    <p>1</p>
                    <span>1</span>
                </figure>
               </a>
            </div>
        </div>

        <h4>
            <span>智能穿戴</span>
            <span>
                <a href="">热门</a>
                <a href="">穿戴</a>
            </span>
        </h4>
        <div class="zhineng">
            <div class="left">
                <img src="img/9.webp" alt="">
            </div>
            <div class="right">
                <a href="huodong.html">
                    <figure>
                        <img />
                        <figcaption>1</figcaption>
                        <p>1</p>
                        <span>1</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img />
                        <figcaption>1</figcaption>
                        <p>1</p>
                        <span>1</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img />
                        <figcaption>1</figcaption>
                        <p>1</p>
                        <span>1</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img />
                        <figcaption>1</figcaption>
                        <p>1</p>
                        <span>1</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img />
                        <figcaption>1</figcaption>
                        <p>1</p>
                        <span>1</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img />
                        <figcaption>1</figcaption>
                        <p>1</p>
                        <span>1</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img />
                        <figcaption>1</figcaption>
                        <p>1</p>
                        <span>1</span>
                    </figure>
                   </a>
                <figure class="event">
                   <div>
                        <h6>
                            <p>浏览更多</p>
                            <span>热门</span>
                        </h6> 
                          <img src="img/totop_hover.png" alt="">
                   </div>
                   <div>

                   </div>
                </figure>
            </div>
        </div>

        <h4>
            <span>家电</span>
            <span>
                <a href="">热门</a>
                <a href="">电视影音</a>
            </span>
        </h4>
        <div class="jiadian">
            <div class="left">
              <figure><img src="img/10.webp" alt=""></figure>
              <figure><img src="img/11.webp" alt=""></figure>
             
            </div>
            <div class="right">
                <a href="huodong.html">
                    <figure>
                        <img />
                        <figcaption>1</figcaption>
                        <p>1</p>
                        <span>1</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img />
                        <figcaption>1</figcaption>
                        <p>1</p>
                        <span>1</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img />
                        <figcaption>1</figcaption>
                        <p>1</p>
                        <span>1</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img />
                        <figcaption>1</figcaption>
                        <p>1</p>
                        <span>1</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img />
                        <figcaption>1</figcaption>
                        <p>1</p>
                        <span>1</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img />
                        <figcaption>1</figcaption>
                        <p>1</p>
                        <span>1</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img />
                        <figcaption>1</figcaption>
                        <p>1</p>
                        <span>1</span>
                    </figure>
                   </a>
                <figure class="event">
                    <div>
                         <h6>
                             <p>米家电烤箱</p>
                             <span>200元</span>
                         </h6> 
                           <img src="img/27.jpg" alt="">
                    </div>
                    <div>
                        <h6>
                            <p>浏览更多</p>
                            <span>热门</span>
                        </h6> 
                          <img src="img/totop_hover.png" alt="">
                    </div>
                 </figure>
            </div>
        </div>

        <h4>
            <span>生活电器</span>
            <span>
                <a href="">扫地机</a>
                <a href="">空净</a>
                <a href="">清洁</a>
                <a href="">风扇</a>
            </span>
        </h4>
        <div class="shenghuo">
            <div class="left">
              <figure><img src="img/12.webp" alt=""></figure>
              <figure><img src="img/13.webp" alt=""></figure>
             
            </div>
            <div class="right">
                <a href="huodong.html">
                    <figure>
                        <img />
                        <figcaption>1</figcaption>
                        <p>1</p>
                        <span>1</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img />
                        <figcaption>1</figcaption>
                        <p>1</p>
                        <span>1</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img />
                        <figcaption>1</figcaption>
                        <p>1</p>
                        <span>1</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img />
                        <figcaption>1</figcaption>
                        <p>1</p>
                        <span>1</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img />
                        <figcaption>1</figcaption>
                        <p>1</p>
                        <span>1</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img />
                        <figcaption>1</figcaption>
                        <p>1</p>
                        <span>1</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img />
                        <figcaption>1</figcaption>
                        <p>1</p>
                        <span>1</span>
                    </figure>
                   </a>
                <figure class="event">
                    <div>
                         <h6>
                             <p>米家直流变频循环落地风扇 电池版</p>
                             <span>599元</span>
                         </h6> 
                           <img src="img/28.png" alt="">
                    </div>
                    <div>
                        <h6>
                            <p>浏览更多</p>
                            <span>风扇</span>
                        </h6> 
                          <img src="img/totop_hover.png" alt="">
                    </div>
                 </figure>
            </div>
        </div>

        <h1><img src="img/6.webp" alt=""></h1>

        <h4>
            <span>厨房电器</span>
            <span>
                <a href="">净水器</a>
                <a href="">烟灶</a>
                <a href="">电饭煲</a>
                <a href="">微蒸烤</a>
            </span>
        </h4>
        <div class="chufang">
            <div class="left">
              <figure><img src="img/14.webp" alt=""></figure>
              <figure><img src="img/15.webp" alt=""></figure>
             
            </div>
            <div class="right">
                <a href="huodong.html">
                    <figure>
                        <img src="//cdn.cnbj1.fds.api.mi-img.com/mi-mall/1889916871e84f151975bb83014ea61f.jpg?thumb=1&w=188&h=188&f=webp&q=90">
                        <figcaption>小米净水器</figcaption>
                        <p>大流量，鲜活手杯水</p>
                        <span>3499元</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img src="//cdn.cnbj1.fds.api.mi-img.com/mi-mall/1c5909c8e91f871efaf94e2159b6f85e.jpg?thumb=1&w=188&h=188&f=webp&q=90">
                        <figcaption>小米即热净水器</figcaption>
                        <p>经热一体，精选温度</p>
                        <span>3499元</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img src="//cdn.cnbj1.fds.api.mi-img.com/mi-mall/6594e9856ed024575434d7d81d86e868.jpg?thumb=1&w=188&h=188&f=webp&q=90">
                        <figcaption>小米净水器H</figcaption>
                        <p>纯净生活双出水</p>
                        <span>1199元</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img src="//cdn.cnbj1.fds.api.mi-img.com/mi-mall/c09841227b58f4e0271ec9086753e6a1.jpg?thumb=1&w=188&h=188&f=webp&q=90">
                        <figcaption>小米净水器600G</figcaption>
                        <p>加仑通量，流速更快</p>
                        <span>1299元</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img src="//cdn.cnbj1.fds.api.mi-img.com/mi-mall/1c71ab7e9c2508f75acc9a50f2d0dcd6.jpg?thumb=1&w=188&h=188&f=webp&q=90">
                        <figcaption>小米净水器800G</figcaption>
                        <p>APP检测水质</p>
                        <span>1799元</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img src="//cdn.cnbj1.fds.api.mi-img.com/mi-mall/924690d930af1fa0ebfe6945840f5033.jpg?thumb=1&w=188&h=188&f=webp&q=90">
                        <figcaption>小米净水器1000G</figcaption>
                        <p>双Ro反渗透净化</p>
                        <span>2499元</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img src="//cdn.cnbj1.fds.api.mi-img.com/mi-mall/5fa153eaa084af41915d0c57454f1b9f.jpg?thumb=1&w=188&h=188&f=webp&q=90">
                        <figcaption>小米台式净饮机</figcaption>
                        <p>乐享鲜活纯净水</p>
                        <span>1099元</span>
                    </figure>
                   </a>
                <figure class="event">
                    <div>
                         <h6>
                             <p>米家智能调压电压锅5L</p>
                             <span>549元</span>
                         </h6> 
                           <img src="img/29.jpg" alt="">
                    </div>
                    <div>
                        <h6>
                            <p>浏览更多</p>
                            <span>电饭煲</span>
                        </h6> 
                         <img src="img/totop_hover.png" alt="">
                    </div>
                 </figure>
            </div>
        </div>

        <h4>
            <span>智能家居</span>
            <span>
                <a href="">小爱音箱</a>
                <a href="">门锁</a>
                <a href="">路由器</a>
                <a href="">智能设备</a>
            </span>
        </h4>
        <div class="jiaju">
            <div class="left">
              <figure><img src="img/16.webp" alt=""></figure>
              <figure><img src="img/17.webp" alt=""></figure>
             
            </div>
            <div class="right">
                <a href="huodong.html">
                    <figure>
                        <img src="//cdn.cnbj1.fds.api.mi-img.com/mi-mall/adce4500b997efaf6e3ff8e8150215f4.jpg?thumb=1&w=188&h=188&f=webp&q=90">
                        <figcaption>小米小爱音箱Play</figcaption>
                        <p>是音箱也是时钟</p>
                        <span>149元</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img src="//cdn.cnbj1.fds.api.mi-img.com/mi-mall/4d73fad85fb9f683109834a882ba15a6.jpg?thumb=1&w=188&h=188&f=webp&q=90">
                        <figcaption>Xiaomi Sound</figcaption>
                        <p>小米高保真智能音箱</p>
                        <span>499元</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img src="//cdn.cnbj1.fds.api.mi-img.com/mi-mall/e7c6e79433c883e1a022ec21402c1679.jpg?thumb=1&w=188&h=188&f=webp&q=90">
                        <figcaption>小米小爱音箱</figcaption>
                        <p>听音乐。遥控家电</p>
                        <span>99元</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img src="//cdn.cnbj1.fds.api.mi-img.com/mi-mall/8b619d27877bbc497468c673a317a847.jpg?thumb=1&w=188&h=188&f=webp&q=90">
                        <figcaption>小米小爱音箱Pro</figcaption>
                        <p>语音遥控5000</p>
                        <span>299元</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img src="//cdn.cnbj1.fds.api.mi-img.com/mi-mall/86c3f61639ae6a2a9a205a463d338ed2.jpg?thumb=1&w=188&h=188&f=webp&q=90">
                        <figcaption>小米AI音箱</figcaption>
                        <p>小米AI音箱</p>
                        <span>199元</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img src="//cdn.cnbj1.fds.api.mi-img.com/mi-mall/9946e252a7c49662376c056ced004a20.jpg?thumb=1&w=188&h=188&f=webp&q=90">
                        <figcaption>小米小爱触屏音箱</figcaption>
                        <p>全面升级</p>
                        <span>249元</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img src="//cdn.cnbj1.fds.api.mi-img.com/mi-mall/e13900c094ae4ac4eb53b35f2d0c95b0.jpg?thumb=1&w=188&h=188&f=webp&q=90">
                        <figcaption>小米小爱音箱</figcaption>
                        <p>好听，更</p>
                        <span>249元</span>
                    </figure>
                   </a>
                <figure class="event">
                    <div>
                         <h6>
                             <p>小米小爱音箱Art电池版</p>
                             <span>349元</span>
                         </h6> 
                           <img src="img/30.jpg" alt="">
                    </div>
                    <div>
                        <h6>
                            <p>浏览更多</p>
                            <span>小爱音箱</span>
                        </h6> 
                          <img src="img/totop_hover.png" alt="">
                    </div>
                 </figure>
            </div>
        </div>

        <h4>
            <span>运动出行</span>
            <span>
                <a href="">平衡车/滑板车</a>
                <a href="">运动健身</a>
                <a href="">箱包配饰</a>
                <a href="">出行工具</a>
            </span>
        </h4>
        <div class="yundong">
            <div class="left">
              <figure><img src="img/18.webp" alt=""></figure>
              <figure><img src="img/19.webp" alt=""></figure>
             
            </div>
            <div class="right">
                <a href="huodong.html">
                    <figure>
                        <img src="//cdn.cnbj0.fds.api.mi-img.com/b2c-miapp-a1/T1r_x_BgLT1RXrhCrK.jpg?thumb=1&w=188&h=188">
                        <figcaption>九号平衡车</figcaption>
                        <p>年轻人的玩家</p>
                        <span>1999元</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img src="//cdn.cnbj1.fds.api.mi-img.com/mi-mall/223f9f2c0f9765851adff89e43db65f0.jpg?thumb=1&w=188&h=188&f=webp&q=90">
                        <figcaption>九号平衡车燃动版</figcaption>
                        <p>燃动升级</p>
                        <span>2299元</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img src="//cdn.cnbj0.fds.api.mi-img.com/b2c-miapp-a1/877d3ce8-68ab-7506-2a78-55a8c0fba946.png?thumb=1&w=188&h=188">
                        <figcaption>九号平衡车Plus</figcaption>
                        <p>一个形影不离的伙伴</p>
                        <span>2999元</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img src="//cdn.cnbj1.fds.api.mi-img.com/mi-mall/3622a82de99a8a3ee1a元eb2b2b7586209.jpg?thumb=1&w=188&h=188&f=webp&q=90">
                        <figcaption>米家电动滑板车1S</figcaption>
                        <p>型出格</p>
                        <span>1999</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img src="//cdn.cnbj1.fds.api.mi-img.com/mi-mall/aabf1a475043266cf4759ec58d0f679c.jpg?thumb=1&w=188&h=188&f=webp&q=90">
                        <figcaption>小米米家电动滑板车</figcaption>
                        <p>性能提升</p>
                        <span>3099元</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img src="//cdn.cnbj1.fds.api.mi-img.com/mi-mall/609d0a457c7f8ac27d76f953c8acb7fc.jpg?thumb=1&w=188&h=188&f=webp&q=90">
                        <figcaption>九号卡丁车</figcaption>
                        <p>九号卡丁车</p>
                        <span>9999元</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img src="//cdn.cnbj1.fds.api.mi-img.com/mi-mall/fcc87477432d45a0e13a544cd5d7b2f5.jpg?thumb=1&w=188&h=188&f=webp&q=90">
                        <figcaption>九号平衡车</figcaption>
                        <p>小朋友的大玩具</p>
                        <span>2799元</span>
                    </figure>
                   </a>
                <figure class="event">
                    <div>
                         <h6>
                            <p>浏览更多</p>
                            <span>平衡车/滑板车</span>
                        </h6> 
                         <img src="img/totop_hover.png" alt="">
                    </div>
                    <div>
                       
                    </div>
                 </figure>
            </div>
        </div>

        <h1><img src="img/7.webp" alt=""></h1>

        <h4>
            <span>日用百货</span>
            <span>
                <a href="">个护健康</a>
                <a href="">电源/线材</a>
                <a href="">儿童用品</a>
                <a href="">家居床品</a>
            </span>
        </h4>
        <div class="riyong">
            <div class="left">
              <figure><img src="img/21.webp" alt=""></figure>
              <figure><img src="img/22.webp" alt=""></figure>
             
            </div>
            <div class="right">
                <a href="huodong.html">
                    <figure>
                        <img src="//cdn.cnbj1.fds.api.mi-img.com/mi-mall/e2ad7080408a1434b90f824f50293b89.jpg?thumb=1&w=188&h=188&f=webp&q=90">
                        <figcaption>米家声波电动牙刷</figcaption>
                        <p>米家声波电动牙刷</p>
                        <span>399元</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img src="//cdn.cnbj1.fds.api.mi-img.com/mi-mall/b5566da4f82e730c21bc8d85b3819f7b.jpg?thumb=1&w=188&h=188&f=webp&q=90">
                        <figcaption>米家电动剃须刀</figcaption>
                        <p>浮动贴面更干净</p>
                        <span>169元</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img src="//cdn.cnbj1.fds.api.mi-img.com/mi-mall/4cd18c61d5786df7dfb4a8927d83da66.jpg?thumb=1&w=188&h=188&f=webp&q=90">
                        <figcaption>米家理发器</figcaption>
                        <p>米家理发器</p>
                        <span>129元</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img src="//cdn.cnbj1.fds.api.mi-img.com/mi-mall/cccefe4c39329ec01b587d114f64eab5.jpg?thumb=1&w=188&h=188&f=webp&q=90">
                        <figcaption>米家自动洗手机套装</figcaption>
                        <p>伸手出泡</p>
                        <span>79元</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img src="//cdn.cnbj1.fds.api.mi-img.com/mi-mall/7676cd481892743762484613df962606.jpg?thumb=1&w=188&h=188&f=webp&q=90">
                        <figcaption>米家电动冲牙器</figcaption>
                        <p>动力强劲</p>
                        <span>199元</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img src="//cdn.cnbj1.fds.api.mi-img.com/mi-mall/a2e6100cb09462515a939caf8bbe56ab.jpg?thumb=1&w=188&h=188&f=webp&q=90">
                        <figcaption>米家声波电动牙刷T500</figcaption>
                        <p>刷的干净</p>
                        <span>179元</span>
                    </figure>
                   </a>
                   <a href="huodong.html">
                    <figure>
                        <img src="//cdn.cnbj1.fds.api.mi-img.com/mi-mall/161335ac42176491d4e98986c6b9de68.jpg?thumb=1&w=188&h=188&f=webp&q=90">
                        <figcaption>米家电子体温计</figcaption>
                        <p>快速知体温</p>
                        <span>69元</span>
                    </figure>
                   </a>
                <figure class="event">
                    <div>
                         <h6>
                             <p>8H记忆绵多功能午睡枕</p>
                             <span>69元</span>
                         </h6> 
                           <img src="img/27.jpg" alt="">
                    </div>
                    <div>
                        <h6>
                            <p>浏览更多</p>
                            <span>家居床品</span>
                        </h6> 
                          <img src="img/totop_hover.png" alt="">
                    </div>
                 </figure>
            </div>
        </div>

        <h3>
            <span>视频</span>
           <a href="">查看更多
               <span> > </span>
           </a>
        </h3>

        <div class="shiping">
            <figure>
                <img src="img/23.webp" alt="">
                <figcaption>2021年春季新品发布会第一场</figcaption>
            </figure>
            <figure>
                <img src="img/24.webp" alt="">
                <figcaption>Redmi 10X系列发布会
                    <p>Redmi 10X系列发布会</p>
                </figcaption>
               
            </figure>
            <figure>
                <img src="img/25.webp" alt="">
                <figcaption>小米10 青春版 发布会</figcaption>
            </figure>
            <figure>
                <img src="img/25.webp" alt="">
                <figcaption>小米10 8K手机拍大片</figcaption>
            </figure>
            
        </div>
        

    </div>
</div>
<script src="js/jQuery.js"></script>
<script src="js/ajaxFun.js"></script>
<script>
    ajaxFun("get","./goodsAndShoppingCart/getGoodsList.php",true,"",fun);
    function fun(resText){
        let json = JSON.parse(resText);
        

            for(let i=0;i<$(".main .center .right figure").length;i++){
            $(".main .center .right figure").eq(i).find("img").attr("src",json[i].goodsImg);
            $(".main .center .right figure").eq(i).find("figcaption").html(json[i].goodsName);
            $(".main .center .right figure").eq(i).find("p").html(json[i].goodsDesc);
            $(".main .center .right figure").eq(i).find("span").html(json[i].goodsPrice);
        }

        for (let i = 0; i < $(".main figure").length; i++) {
        $(".main figure").eq(i).click(function() {
            location.href = "xiangqin.html?goodsId=" + json[i].goodsId; 
        });
    }
 
    }

  

   
</script>